package com.example.designpatterns.creational.singleton;

/**
 * 单例模式（内部类写法）
 *
 * @author scott
 */
public class LazyInnerClassSingleton {

    private LazyInnerClassSingleton() {
    }

    private static class SingletonHolder {
        private static final LazyInnerClassSingleton INSTANCE = new LazyInnerClassSingleton();
    }

    public static LazyInnerClassSingleton getInstance() {
        return SingletonHolder.INSTANCE;
    }

}
